System default dark mode#92
Conversation
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
|
@kumaradityaraj Thanks for the PR. Looks like this only handles the first part of ticket for system default but the second part needs to be done "implement an attribute in the component to override this behaviour and force a specific theme" |
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
Pull request overview
Implements theme switching for the diagram editor by wiring React Flow’s colorMode to a new state (defaulting to system), and removes the previous hardcoded diagram background styling.
Changes:
- Add
colorMode="system"support to@xyflow/reactReactFlowvia component state. - Add a UI
<select>to manually switch betweendark,light, andsystem. - Remove
.diagram-backgroundstyling from the diagram CSS; add a test-run artifact file.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.tsx | Adds colorMode state, passes it to ReactFlow, and introduces a theme dropdown UI. |
| packages/serverless-workflow-diagram-editor/src/react-flow/diagram/Diagram.css | Removes background styling previously applied via .diagram-background. |
| packages/serverless-workflow-diagram-editor/test-results/.last-run.json | Adds last test run result artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@fantonangeli |
|
@kumaradityaraj I was thinking about:
|
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
Use sand flow background
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: fantonangeli <fabrizio.antonangeli@gmail.com>
…css-classes Implement colorMode css classes
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
packages/serverless-workflow-diagram-editor/src/diagram-editor/DiagramEditor.tsx:63
DiagramEditorusesprops.refwithuseImperativeHandle, butrefis not passed as a normal prop to function components unless the component is wrapped withReact.forwardRef. As-is, the imperative handle will never be exposed to consumers. ConvertDiagramEditortoforwardRef(removereffromDiagramEditorProps) and use the forwarded ref inuseImperativeHandle.
// Allow imperatively controlling the Editor
React.useImperativeHandle(
props.ref,
() => ({
doSomething: () => {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@fantonangeli @lornakelly Its ready for final review. |
Signed-off-by: kumaradityaraj <sedulous.0007@gmail.com>
fantonangeli
left a comment
There was a problem hiding this comment.
LGTM, thanks @kumaradityaraj
|
@ricardozanini Please review and merge this PR. Thank you. |
Closes Add support for dark and light theme
This feature implements dark mode by using system current status.
Screen.Recording.2026-04-15.at.2.27.00.PM.mov